#ifndef LEVEL_H
#define LEVEL_H

#include "abstractlevelobject.h"
class AbstractGameObject;

namespace LevelObjects {

class LevelObjectSelectionManager;

class Level : public AbstractLevelObject
{
	Q_OBJECT

public:
	typedef QList<QPointer<AbstractLevelObject> > LevelActors;
	Level(QObject *parent, const QString& name);

	LevelObjectType type() const;

	QPointer<LevelObjects::AbstractLevelObject> createLevelObject(const QString& name, QPointer<AbstractGameObject> go
		, QPointer<AbstractLevelObject> parentLevelActor = QPointer<AbstractLevelObject>());

	void add(QPointer<AbstractLevelObject> lo);
	void remove(QPointer<AbstractLevelObject> lo);

	const LevelActors& levelActors() const;
	QPointer<LevelObjectSelectionManager> selectionManager() const;
private:
	LevelActors m_levelActors;
	QPointer<LevelObjectSelectionManager> m_selectionManager;
signals:
	void levelObjectAdded(QPointer<AbstractLevelObject> lo);
	void levelObjectRemoved(QPointer<AbstractLevelObject> lo);
};

} // namespace LevelObjects

#endif // LEVEL_H
